home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 8 / Power CD-ROM 8.iso / windows / winbatch / log.wb_ < prev    next >
Text File  |  1994-08-28  |  575b  |  23 lines

  1.  
  2.  
  3. Message("Information","LOGGER.WBT is an example of how to write a logging file with WinBatch. Inspect the file for more information.")
  4. exit
  5.  
  6.  
  7. LogFile="C:\TEMP\MYLOG.INI"
  8.  
  9. User=AskLine("LOG","Enter User Name","Fred")
  10. TimeOn=DateTime()
  11. Program=AskLine("LOG","Enter desired Program","NOTEPAD.EXE")
  12. RunWait(Program,"")
  13. TimeOff=DateTime()
  14.  
  15. LogLine=strcat(User,"|",Program,"|",TimeOn,"|",TimeOff)
  16.  
  17. Counting=IniReadPvt("LOG","Counter",0,LogFile)
  18. Counting=Counting+1
  19. IniWritePvt("LOG","Counter",Counting,LogFile)
  20. IniWritePvt("LOG",Counting,LogLine,LogFile)
  21.  
  22.  
  23.